package vn.gq.tym.scr;

import java.io.IOException;

import vn.appmobi.comictp.R;
import vn.gq.tym.utils.FileUtils;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;

public class IntroScr extends BaseFragment {
	
	public static IntroScr newInstance() {
		IntroScr f = new IntroScr();
		Bundle args = new Bundle();
		f.setArguments(args);
		return f;
	}
	
	@Override
	protected int getLayoutId() {
		return R.layout.intro_fragment;
	}

	@Override
	protected int getContainerId() {
		return 0;
	}

	@Override
	protected void createView() {
		TextView introTv = (TextView) findViewById(R.id.tv_intro);
		
		try {
			String contentString = FileUtils.convertStreamToString(getActivity().getAssets().open("description"));
			introTv.setText(Html.fromHtml(contentString));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
